fix: upgrade core-js to resolve SEC-2158 security vulnerability#673
Closed
harekrishnarai wants to merge 1 commit intoauth0:mainfrom
Closed
fix: upgrade core-js to resolve SEC-2158 security vulnerability#673harekrishnarai wants to merge 1 commit intoauth0:mainfrom
harekrishnarai wants to merge 1 commit intoauth0:mainfrom
Conversation
- Add package.json override to force core-js version to ^3.23.3 - Resolves deprecated core-js@3.20.3 dependency vulnerability - Maintains compatibility with Angular 13 and @angular-devkit/build-angular - All tests pass and build works correctly Fixes: SEC-2158
Member
|
As mentioned in slack, this SDK only support major versions that Angular supports, see https://github.com/auth0/auth0-angular?tab=readme-ov-file#requirements. That means, today, we only have to worry about v18 and above, see: https://angular.dev/reference/releases#support-policy-and-schedule. I think we should be able to solve it in that way as well if we want. |
Member
|
Closing in favor of #675 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR resolves the SEC-2158 security vulnerability by upgrading the deprecated
core-js@3.20.3dependency to version^3.23.3or later.Background:
The vulnerability was identified by Socket.dev with the following details:
core-js@3.20.3core-js@<3.23.3is no longer maintained and not recommended for usage due to performance issues (up to 100x slowdown in V8 engine) and web compatibility issuesImplementation:
Since
core-js@3.20.3was a transitive dependency through@angular-devkit/build-angular@13.3.11, and upgrading Angular DevKit to a newer major version would require updating Angular itself (breaking change), I used npmoverridesto force a newercore-jsversion while maintaining full compatibility with the existing Angular 13 setup.Changes Made:
overridesfield to package.json to forcecore-jsversion to^3.23.3References
Testing
Verification Steps:
npm install- Dependencies install successfully with overridenpm ls core-js- Showscore-js@3.43.0 overriddeninstead of deprecated3.20.3npm run build:dev- Build completes successfullynpm test- All 108 tests passnpm audit- The specificcore-jsvulnerability is no longer reportedEnvironment:
Manual Testing:
The library builds and tests successfully with the new
core-jsversion. All existing functionality remains intact as this is purely a dependency security update with no code changes to the library itself.Checklist